#!/bin/bash

HOSTS=$1
WRITES=$2

trap ctrl_c INT

function ctrl_c() {
  exit
}

rm server*

for j in {2..20..2}
do
  echo -n "> running with -np ${j}... "
  for i in {1..10}
  do
    echo -n "${i}, "
    mpirun -np $j -hostfile $HOSTS "Release/pdc-t3.0" $WRITES
  done
  echo "done!"
done

